3.183 \(\int \frac {\cos (e+f x)}{a+b \sec ^2(e+f x)} \, dx\)

Optimal. Leaf size=52 \[ \frac {\sin (e+f x)}{a f}-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{a^{3/2} f \sqrt {a+b}} \]

[Out]

sin(f*x+e)/a/f-b*arctanh(sin(f*x+e)*a^(1/2)/(a+b)^(1/2))/a^(3/2)/f/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4147, 388, 208} \[ \frac {\sin (e+f x)}{a f}-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{a^{3/2} f \sqrt {a+b}} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]/(a + b*Sec[e + f*x]^2),x]

[Out]

-((b*ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + b]])/(a^(3/2)*Sqrt[a + b]*f)) + Sin[e + f*x]/(a*f)

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 4147

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fr
eeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2*x^2)^
((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n
/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\cos (e+f x)}{a+b \sec ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1-x^2}{a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\sin (e+f x)}{a f}-\frac {b \operatorname {Subst}\left (\int \frac {1}{a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{a f}\\ &=-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{a^{3/2} \sqrt {a+b} f}+\frac {\sin (e+f x)}{a f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 52, normalized size = 1.00 \[ \frac {\sqrt {a} \sin (e+f x)-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{\sqrt {a+b}}}{a^{3/2} f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]/(a + b*Sec[e + f*x]^2),x]

[Out]

(-((b*ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + b]])/Sqrt[a + b]) + Sqrt[a]*Sin[e + f*x])/(a^(3/2)*f)

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 164, normalized size = 3.15 \[ \left [\frac {\sqrt {a^{2} + a b} b \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {a^{2} + a b} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + 2 \, {\left (a^{2} + a b\right )} \sin \left (f x + e\right )}{2 \, {\left (a^{3} + a^{2} b\right )} f}, \frac {\sqrt {-a^{2} - a b} b \arctan \left (\frac {\sqrt {-a^{2} - a b} \sin \left (f x + e\right )}{a + b}\right ) + {\left (a^{2} + a b\right )} \sin \left (f x + e\right )}{{\left (a^{3} + a^{2} b\right )} f}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

[1/2*(sqrt(a^2 + a*b)*b*log(-(a*cos(f*x + e)^2 + 2*sqrt(a^2 + a*b)*sin(f*x + e) - 2*a - b)/(a*cos(f*x + e)^2 +
 b)) + 2*(a^2 + a*b)*sin(f*x + e))/((a^3 + a^2*b)*f), (sqrt(-a^2 - a*b)*b*arctan(sqrt(-a^2 - a*b)*sin(f*x + e)
/(a + b)) + (a^2 + a*b)*sin(f*x + e))/((a^3 + a^2*b)*f)]

________________________________________________________________________________________

giac [A]  time = 0.23, size = 55, normalized size = 1.06 \[ \frac {\frac {b \arctan \left (\frac {a \sin \left (f x + e\right )}{\sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} a} + \frac {\sin \left (f x + e\right )}{a}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

(b*arctan(a*sin(f*x + e)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a*b)*a) + sin(f*x + e)/a)/f

________________________________________________________________________________________

maple [A]  time = 1.40, size = 45, normalized size = 0.87 \[ \frac {\frac {\sin \left (f x +e \right )}{a}-\frac {b \arctanh \left (\frac {a \sin \left (f x +e \right )}{\sqrt {\left (a +b \right ) a}}\right )}{a \sqrt {\left (a +b \right ) a}}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)/(a+b*sec(f*x+e)^2),x)

[Out]

1/f*(1/a*sin(f*x+e)-1/a*b/((a+b)*a)^(1/2)*arctanh(a*sin(f*x+e)/((a+b)*a)^(1/2)))

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 67, normalized size = 1.29 \[ \frac {\frac {b \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} a} + \frac {2 \, \sin \left (f x + e\right )}{a}}{2 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

1/2*(b*log((a*sin(f*x + e) - sqrt((a + b)*a))/(a*sin(f*x + e) + sqrt((a + b)*a)))/(sqrt((a + b)*a)*a) + 2*sin(
f*x + e)/a)/f

________________________________________________________________________________________

mupad [B]  time = 4.40, size = 44, normalized size = 0.85 \[ \frac {\sin \left (e+f\,x\right )}{a\,f}-\frac {b\,\mathrm {atanh}\left (\frac {\sqrt {a}\,\sin \left (e+f\,x\right )}{\sqrt {a+b}}\right )}{a^{3/2}\,f\,\sqrt {a+b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)/(a + b/cos(e + f*x)^2),x)

[Out]

sin(e + f*x)/(a*f) - (b*atanh((a^(1/2)*sin(e + f*x))/(a + b)^(1/2)))/(a^(3/2)*f*(a + b)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)/(a+b*sec(f*x+e)**2),x)

[Out]

Integral(cos(e + f*x)/(a + b*sec(e + f*x)**2), x)

________________________________________________________________________________________